import {createAction} from 'redux-actions';
import api from '../../utils/api';
import actionTypes from '../action-types/sigin';

export const SIGNIN = createAction(
  actionTypes.SIGNIN,
  () => {
    return api({
      method: 'POST',
      url: '/login/auth',
      data
    })
      .then(res => res.data)
      .catch(() => {});
  },
);